/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package entity.structure;

/**
 *
 * @author dell
 */
import entity.support.Area;
import entity.support.LogIndexable;
import entity.support.Obj;
import java.util.Map;
import java.util.HashMap;
import java.util.List;
import java.util.LinkedList;
public class Company extends Obj implements LogIndexable
{
//columns_______________________________________________________________________   
private String code;
private int type;
private String province;
private String city;
private String district;
private Area area;
private int property;
private int personnum;
private String buildingid;
private String contact;
private String remark;
//functions_____________________________________________________________________
     //constructor______________________________________________________________
public Company()
{
     
}
public Company(Obj o)
{
     this.id=o.getId();
     this.name=o.getName();
     this.intime=o.getIntime();
     this.updatetime=o.getUpdatetime();
}
public Company(Map<String,String> map)
{
     
}
     //getter___________________________________________________________________
public String getCode() 
{
     return code;
}
public int getType() 
{
     return type;
}
public String getProvince() 
{
     return province;
}
public String getCity() 
{
     return city;
}
public String getDistrict() 
{
     return district;
}
public Area getArea() 
{
     return area;
}
public int getProperty() 
{
     return property;
}
public int getPersonnum() 
{
     return personnum;
}
public String getBuildingid() 
{
     return buildingid;
}
public String getContact() 
{
     return contact;
}
public String getRemark() 
{
     return remark;
}
     //setter___________________________________________________________________
 public void setCode(String code) 
 {
     this.code = code;
}
public void setType(int type) 
{
     this.type = type;
}
public void setProvince(String province) 
{
     this.province = province;
}
public void setCity(String city) 
{
     this.city = city;
}
public void setDistrict(String district) 
{
     this.district = district;
}
public void setArea(Area area) 
{
     this.area = area;
}
public void setProperty(int property) 
{
     this.property = property;
}
public void setPersonnum(int personnum) 
{
     this.personnum = personnum;
}
public void setBuildingid(String buildingid) 
{
     this.buildingid = buildingid;
}
public void setContact(String contact) 
{
     this.contact = contact;
}
public void setRemark(String remark) 
{
     this.remark = remark;
}
     //operator_________________________________________________________________
public List<String> getBuildingidInList()
{
     return StructureUtil.toList(this.buildingid);
}
public Map<String,String> getContactInMap()
{
     return StructureUtil.toMap(this.contact);
}
     ///toString________________________________________________________________
@Override
public String toString()
{
     return super.toString()+"\t"+code+"\t"+type+"\t"+province+"\t"+city+"\t"
             +district+"\t"+area+"\t"+property+"\t"+personnum+"\t"+buildingid+"\t"
             +contact+"\t"+remark;
}
}
